package net.lainiao.other.demo1;

/**
 * Created by Administrator on 2017/3/13.
 */
public class TestVolatile {
    public volatile  int  total=0;
    public void add(){
         total++;
    }

    public int getTotal() {
        return total;
    }

    public void setTotal(int total) {
        this.total = total;
    }

    public void remove(){
        total--;

    }
}
